Skip to content

Updated to Hyprland v0.47.2 - #21

Merged
pyt0xic merged 19 commits into
pyt0xic:mainfrom
avih7531:main
Oct 5, 2025
Merged

Updated to Hyprland v0.47.2#21
pyt0xic merged 19 commits into
pyt0xic:mainfrom
avih7531:main

Conversation

@avih7531

Copy link
Copy Markdown

Full functionality on Hyprland v0.47.2

Big thanks to @noisethanks for his fork which got me 90% of the way there

@avih7531 avih7531 mentioned this pull request Feb 19, 2025

@daxisunder daxisunder left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested these on official Arch package of Hyprland and everything works as it should.

@MartinLoeper

Copy link
Copy Markdown

I had to add changes from #17 to make it work with latest nixos unstable branch. Now it works like a charm. Thanks!!

Thaumy added a commit to Thaumy/dotfiles that referenced this pull request Mar 10, 2025
@pyt0xic pyt0xic self-assigned this Oct 5, 2025
@pyt0xic
pyt0xic requested a review from daxisunder October 5, 2025 22:30
@pyt0xic

pyt0xic commented Oct 5, 2025

Copy link
Copy Markdown
Owner

WARNING: AI Generated !!!!!!


General Overview

This PR updates the plugin to use newer APIs, improves animation handling, refactors variable usage to shared pointers, and updates documentation for better clarity and setup instructions. The changes are mostly in C++ files that handle focus animations for Hyprland, as well as the README.


Key Code Changes

1. Animation Manager and Variable Refactor

  • Includes Updated:

    • Changed from #include <hyprland/src/managers/AnimationManager.hpp>
      to #include <hyprland/src/managers/animation/AnimationManager.hpp>
      (in multiple files).
  • Variable Types Updated:

    • Switched from raw types like CAnimatedVariable<float> to shared pointer types e.g. PHLANIMVAR<float> and CSharedPointer<SAnimationPropertyConfig>.
    • Replaced direct member access with pointer dereferencing (e.g., m_sFocusInAnimConfig->internalEnabled).
  • Animation Handling:

    • Refactored methods to use shared/configured pointers and callbacks.
    • Used new API functions such as HyprlandAPI::addDispatcherV2 instead of addDispatcher.
    • Updated the flash and shrink animation logic to use new member variables and callback signatures.

2. Error Handling and Return Types

  • Dispatcher Callback:
    • flashCurrentWindow now returns an SDispatchResult with details about success or failure, error messages, and whether to pass the event.
    • Improved error reporting: e.g., returns "HyprFocus is disabled" or "No previously focused window" messages.

3. README and Documentation

  • Install Instructions:
    • Updated hyprpm add line to use a forked repo, added hyprpm enable.
  • Config Examples:
    • Provided an improved config sample, with recommended values for animation types, beziers, speeds, and opacity.
    • Clarified the plugin and animation configuration block.
    • Updated defaults for shrink and flash animations.
  • Links:
    • Added references to upstream and original repositories.

Assessment

Improvements

  • Modernization:
    • Refactors code to use shared pointers and improved API calls, making the plugin compatible with the latest Hyprland changes.
  • Robustness:
    • Better error handling in dispatcher callbacks improves user feedback.
  • Clarity:
    • README changes make installation and configuration clearer for new users.

Potential Issues

  • Breaking Changes:
    • Changes to dispatcher registration (addDispatcherV2) and variable types mean older configs or code may not be compatible.
  • Config Migration:
    • Some config keys and recommended values have changed; users may need to update their Hyprland configs.

Summary

  • This PR substantially refactors the animation code to use modern Hyprland APIs and pointer types.
  • It improves error handling and feedback when the plugin is disabled or no window is focused.
  • Documentation is updated for clarity and ease of use.
  • Overall, these changes modernize the plugin and improve user experience, but may require users to update their configs for compatibility.

I dont have time right now to test this (and I am now using MacOS at work, ew I know, so testing hasn't been happening as often), but @daxisunder approved so YOLO

@daxisunder If I were to add you as a maintainer/admin in this repo, would you like to pick this kind of stuff up going forward.

I only use Hyprland on my desktop which I dont use as much these days, waiting for Asahi support on the M4 Airs xD

@daxisunder

daxisunder commented Oct 5, 2025

Copy link
Copy Markdown

I'm sorry, but I'm not that good with c++, I just tested it and it works perfectly fine, hence the approval. I would suggest @avih7531 as a maintainer if he's willing.

@pyt0xic pyt0xic closed this Oct 5, 2025

@pyt0xic pyt0xic left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pyt0xic pyt0xic left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pyt0xic pyt0xic reopened this Oct 5, 2025
@pyt0xic
pyt0xic merged commit a47ecdf into pyt0xic:main Oct 5, 2025
@daxisunder

Copy link
Copy Markdown

In the installation instructions you copied the link to my fork instead of yours, just to let you know.

@pyt0xic

pyt0xic commented Oct 5, 2025

Copy link
Copy Markdown
Owner

@daxisunder bruh the only C++ I know is what I learned in Grade 7 and in my Intro to Programming Module when I was doing my ComSci, which I failed 🤣
You clearly know C++ just as well as I do, which is knowing enough to be able to figure out what you need to teach yourself xD
So dont doubt yourself :) it is impossible to write shit code, cause its all fucking SHITTTTT in some way 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants